/*
 * @Description:
 *
 * @Author: XiongYaoYuan<xiongyaoyuan>
 * @Date: 2023-06-15 20:10:46
 * @FilePath: /yuxiuproweb/src/api/split/bd.js
 */
import request from "@/utils/request";

// 查询商品列表列表
export function listProduct(query) {
  return request({
    url: "/pro/product/DZBD/list",
    method: "get",
    params: query,
  });
}

// 查询商品列表列表
export function changeHandling(query) {
  return request({
    url: "/pro/product/DZBD/changeHandling",
    method: "get",
    params: query,
  });
}

// 查询商品列表详细
export function getProduct(productId) {
  return request({
    url: "/pro/product/DZBD/" + productId,
    method: "get",
  });
}

// 获取商品材料列表
export function getProductFabricList(productId) {
  return request({
    url: "/pro/product/DZBD/getProductFabricList/" + productId,
    method: "get",
  });
}

// 保存商品材料列表
export function updateProduct(data) {
  return request({
    url: "/pro/product/DZBD",
    method: "put",
    data: data,
  });
}

// 拆单 - 变更计划备注
export function updateRemark(query) {
  return request({
    url: "/pro/product/DZBD/updateRemark",
    method: "get",
    params: query,
  });
}

export function splitOrderDZCL(ids) {
  return request({
    url: `/pro/product/DZBD/splitOrder/${ids}`,
    method: "post",
  });
}

// 更新打印状态
export function updatePrint(query) {
  return request({
    url: "/pro/product/DZBD/updatePrint",
    method: "get",
    params: query,
  });
}

// 工序拆单
export function processSplitOrder(ids) {
  return request({
    url: `/pro/product/DZBD/processSplitOrder/${ids}`,
    method: "get",
  });
}
// 查询工序
export function getProcessList(query) {
  return request({
    url: "/pro/product/DZBD/getProcessList",
    method: "get",
    params: query,
  });
}
// 保存工序
export function updateProcessList(data) {
  return request({
    url: "/pro/product/DZBD/updateProcessList",
    method: "post",
    data: data,
  });
}
